﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using projectConsole;

namespace projectConsoleAAA
{
    class Program
    {
        static void Main(string[] args)
        {
            //classA kelasA = new classA();
            //projectConsole.classB kelasB = new projectConsole.classB();

            //IList<Point> points = new List<Point>();
            //points.Add(new Point { X = 1, Y = 2 });
            //points.Add(new Point { X = 1, Y = 3 });
            //points.Add(new Point { X = 1, Y = 4 });
            //points.Add(new Point { X = 2, Y = 2 });
            //points.Add(new Point { X = 2, Y = 3 });
            //points.Add(new Point { X = 2, Y = 4 });

            //var pointsX1 = points.Where(p => p.X == 1 && p.Y == 4);
            //foreach (var point in pointsX1)
            //{
            //    Console.WriteLine("Point X={0}, Y={1}", point.X, point.Y);
            //}

            IList<Student> students = new List<Student>();
            students.Add(new Student
            {
                Id = "12345",
                Name = "SiX",
                Faculty = "Electrical Engineering",
                Major = "Electro"
            });
            students.Add(new Student
            {
                Id = "12346",
                Name = "SiY",
                Faculty = "Electrical Engineering",
                Major = "Power"
            });
            students.Add(new Student
            {
                Id = "12347",
                Name = "SiA",
                Faculty = "Informatics Engineering",
                Major = "Information System"
            });
            students.Add(new Student
                {
                    Id = "12348",
                    Name = "SiB",
                    Faculty = "Electrical Engineering",
                    Major = "Electro"
                });
            int numbmers = students.Count(s => s.Faculty == "Electrical Engineering");
            Console.WriteLine(numbmers);
        }
    }
}
